package com.haoan.index.controller.api;

import com.haoan.common.annotation.Anonymous;
import com.haoan.common.core.controller.BaseController;
import com.haoan.common.core.page.TableDataInfo;
import com.haoan.index.domain.LcTrends;
import com.haoan.index.service.LcTrendsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(value="api存储业内动态信息",tags = "api收藏信息存储业内动态信息")
@RestController("apiLcTrendsController")
@Anonymous
@RequestMapping("/api/index/LcTrendsController")
public class LcTrendsController extends BaseController {

    @Resource
    private LcTrendsService lcTrendsService;

    /**
     * 查询存储业内动态信息的列表
     */
    @ApiOperation("查询存储业内动态信息的列表")
    @GetMapping("/list")
    public TableDataInfo list(@RequestParam int page,@RequestParam int pageSize)
    {
        List<LcTrends> list = lcTrendsService.selectLcTrendsListToPage();
        return getDataTable(list);
    }
}
